package client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: xuyanan
 * @date: 2021/5/7
 */
@RestController
public class Controller {

    @Autowired
    private ClientA clientA;

    @GetMapping("/getName")
    public String getName() {
        return clientA.getName();
    }

    @GetMapping("/getNiceName/{name}")
    public String getNiceName(@PathVariable("name") String name) {
        return clientA.getNiceName(name);
    }

    @GetMapping("/timeoutMethod")
    public String timeoutMethod() {
        return clientA.timeoutMethod();
    }
}
